<?php
/**

 */
class Form_ServiceForm extends App_Form
{
    public function __construct($options = null)
    {
        parent::__construct($options);

        // change the class on the outer <dl> tag
        $this->getDecorator('HtmlTag')->setOption('class', 'form');

        $this->setName('serviceForm');
        
        $dpt_id = $this->textElement('dpt_id', 'Department id');
        
        $dpt_name = $this->textElement('dpt_name', 'Department name');
        
        $description = $this->textElement('description', 'Description');
        $description->setAttrib('size', '70');
        
        $service_url = $this->textElement('service_url', 'Service url');
        $service_url->setAttrib('size', '50');
        
        $service_name = $this->textElement('service_name', 'Service name');
        
        //$service_area = $this->textElement('service_area', 'Service area');
        $remote_login = $this->textElement('remote_login', 'Remote login url');
        $remote_login->setAttrib('size', '70');        
        
        $icon = $this->textElement('icon', 'Icon name');
        
                
        $transfer_fund_allowed = $this->selectElement('transfer_fund_allowed', 'Transfer fund allowed?', array('Yes'=>'Yes','No'=>'No'));        
      	    
        $network_id = $this->textElement('network_id', 'Network id');
        
        $payment_center_id = $this->textElement('payment_center_id', 'Payment center id');
        
        $submit = $this->submit('submit', 'Submit');
        
        // create array of elements to add to the form
        //$elements = array($dpt_id,$dpt_name,$description,$service_url,$service_name, $service_area,$icon,$transfer_fund_allowed,$network_id,$payment_center_id,$submit);
        $elements = array($dpt_id,$dpt_name,$description,$service_url,$service_name, $remote_login, $icon,$transfer_fund_allowed,$network_id,$payment_center_id,$submit);
        
        $this->addElements($elements);

        // add error summary decorator (will list all validation errors at the
        // top of the form - all 'Error' decorators should be disabled since we
        // are not showing the errors next to the input item (just turning the
        // labels red)
        $this->addDecorator(new App_Form_Decorator_FormErrors(
                   array('placement'=>Zend_Form_Decorator_Abstract::PREPEND,
                    'message'=>'Summary')));

    }

    public function isValid($data)
    {
        
        return true;
    }

}
